<!doctype html>
<html class="no-js" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
    <p th:text="${openid}" hidden="hidden" />
	<div>
		<form @submit="formSubmit">
		    <div class="header">
				<img src="http://localhost:8102/logo.png"></img>
			</div>
			<div class="grace-form">
				<div class="grace-items">
					<img src="http://localhost:8102/user.png" class="icon"></img>
					<input type="text" class="input" name="accountname" placeholder="请输入用户名" />
				</div>
				<div class="grace-items">
					<img src="http://localhost:8102/lock.png" class="icon"></img>
					<input type="password" class="input" name="accountpassword" placeholder="请输入密码" />
				</div>

				<button type="primary" class="primary submit" form-type="submit">登录</button>
			</div>
		</form>
	</div>
</body>
</html>
<script type="text/javascript" src="http://localhost:8102/jweixin-1.3.2.js"></script>
<script type="text/javascript" src="http://localhost:8102/jquery-3.4.1.js"></script>
<script type="text/javascript" src="http://localhost:8102/jquery-3.4.1.min.js"></script>
<script>
	$(document).ready(function(){
		$.get("https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe31a0cfc8ba422f6&redirect_uri=https%3A%2F%2Fxf.wisdiot.com%2Fweifangfirecontrol%2Fsystemsetup%2Fsystemsetup%2Fauthorize&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect",
				function(data,status){
					alert("数据：" + data + "\n状态：" + status);
				});
	});

		//location.href="https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe31a0cfc8ba422f6&redirect_uri=https%3A%2F%2Fxf.wisdiot.com%2Fweifangfirecontrol%2Fsystemsetup%2Fsystemsetup%2Fauthorize&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
        // window.onload=function () {
        //     submitForm(data);
        // }
        // function submitForm(data){
		// //wx.miniProgram.navigateTo(data)
        //     $.ajax({
        //         url: "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxe31a0cfc8ba422f6&redirect_uri=https%3A%2F%2Fxf.wisdiot.com%2Fweifangfirecontrol%2Fsystemsetup%2Fsystemsetup%2Fauthorize&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect" ,
        //         data: {},
        //         type: "GET",
        //         dataType:"json",
        //         async: false,
        //         cache: false,
        //         contentType: false,
        //         processData: false,
        //         success: function (data) {
        //             wx.miniProgram.navigateTo(data)
        //         }
        //     });
	//}


</script>

<style>
	body{
		background: #fff;
		padding: 0;
		margin: 0;
	}
	.header{
		background: url(http://localhost:8102/login_bg.jpg) no-repeat;
		background-size: 100% 350px;
		height: 350px;
		display: flex;
		justify-content: center;
	}
	.header img{
		width: 113px;
		height: 120px;
		margin-top: 20%;
	}
	.grace-form{
		width: 80%;
		margin: 0 auto;
	}

	.grace-label{
		width: 25px;
	}

	::-webkit-input-placeholder {
        color: #999;
        font-size: 16px;
    }

	.grace-items{
		border-bottom: 1px solid #eee;
		height: 40px;
		line-height: 40px;
		margin-bottom: 10px;
	}
	.grace-items .input{
		text-align: left;
		color:#333;
		padding-left: 10px;
		font-size: 18px;
		border:0;
	}
	.grace-items .icon{
		width: 20px;
		height: 22px;
		padding-right: 10px;
		border-right: 1px solid #eee;
	}
	.submit{
		margin-top: 15%;
		width:100%;
		border:0;
		border-radius: 25px;
		height: 50px;
		background: #42aaf7;
		color: #fff;
		font-size: 18px;
	}
</style>
